﻿<Fluent:RibbonWindow    x:Class="MoreEPG.MainWindow"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:converters="clr-namespace:MoreEPG.Converter"
                        xmlns:local="clr-namespace:MoreEPG.Helper"
                        xmlns:uc="clr-namespace:MoreEPG.View"
                        mc:Ignorable="d"
                        WindowStartupLocation="CenterScreen"
                        DataContext="{Binding Main, Source={StaticResource Locator}}"
                        MinHeight="550"
                        MinWidth="400"
                        d:DesignHeight="550"
                        d:DesignWidth="400"
                        xml:lang="en-EN" Icon="/MoreEPG;component/MoreEPG.ico">
   
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Skins/Theme.xaml" />
                <ResourceDictionary Source="pack://application:,,,/Fluent;Component/Themes/Office2010/Blue.xaml" />
                <ResourceDictionary Source="Skins/MainSkin.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Window.Visibility>
        <Binding Path="UIVisible" Converter="{StaticResource bool2visibility}"/>
    </Window.Visibility>
    <DockPanel local:AdornerBehaviour.ShowAdorner="{Binding ShowWait}" local:AdornerBehaviour.Control="{DynamicResource MsgBox}" LastChildFill="True">
        <Fluent:Ribbon DockPanel.Dock="Top" IsQuickAccessToolBarVisible="False">
             
            <Fluent:RibbonTabItem Header="Main">
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding Run}" Header="Run" LargeIcon="Images\Run.png" />
                </Fluent:RibbonGroupBox>
               
                <Fluent:RibbonGroupBox Header="" Margin="10,0,10,0">
                    <Fluent:Button Command="{Binding }" Header="Donate" LargeIcon="Images\Paypal.png" />
                    <Fluent:Button Command="{Binding About}" Header="About" LargeIcon="Images\Info.png" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding Close}" Header="Close" LargeIcon="Images\Close.png" Icon="Images\Close_1.png" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Configuration">
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding DataSource}" Header="Source" LargeIcon="Images\Database.png" />
                    <Fluent:Button Command="{Binding ChannelSettings}" Header="Channels" LargeIcon="Images\Channels.png" />
                    <Fluent:Button Command="{Binding Options}" Header="Options" LargeIcon="Images\Options.png" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding Close}" Header="Close" LargeIcon="Images\Close.png" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
            <Fluent:RibbonTabItem Header="Tools">
                <Fluent:RibbonGroupBox Header="MC Channels">
                    <Fluent:Button Command="{Binding Sort}" Header="Sort" LargeIcon="Images\Sort.png" />
                    <Fluent:Button Command="{Binding ChannelConfig}" Header="Configuration" LargeIcon="Images\Configuration.png" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding MCTools}" Header="MCTools" LargeIcon="Images\MCTools.png" />
                </Fluent:RibbonGroupBox>
                <Fluent:RibbonGroupBox Header="">
                    <Fluent:Button Command="{Binding Close}" Header="Close" LargeIcon="Images\Close.png" />
                </Fluent:RibbonGroupBox>
            </Fluent:RibbonTabItem>
        </Fluent:Ribbon>
        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition Height="*"></RowDefinition>
                <RowDefinition Height="40"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Frame Background="Transparent" ClipToBounds="True" Grid.Column="0" Grid.Row="0" Source="{Binding Content}" NavigationUIVisibility="Hidden"></Frame>
            <ProgressBar Grid.Column="0" Grid.Row="1" DockPanel.Dock="Bottom" Value="{Binding Value}" Margin="10" Height="20" Visibility="{Binding visibility,Converter={StaticResource bool2visibility}}" />
            <Label Grid.Row="1" DockPanel.Dock="Bottom" Visibility="{Binding visibility,Converter={StaticResource bool2visibility}}" Margin="10,0,0,0" Content="{Binding Text}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Red" FontWeight="Bold" FontSize="12"></Label>
        </Grid>
        
    </DockPanel>
</Fluent:RibbonWindow>
